package com.lightsaber.trade.as.common.tag;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.UIBean;
import org.apache.struts2.views.annotations.StrutsTag;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * Convert code to label
 * 
 * @author LiuJian
 * 
 */
@StrutsTag(name = "productTypeDropdown", tldTagClass = "com.lightsaber.trade.as.common.tag.ProductTypeDropdown", description = "productTypeDropdown")
public class ProductTypeDropdown extends UIBean {

    public ProductTypeDropdown(final ValueStack stack, final HttpServletRequest request,
            final HttpServletResponse response) {
        super(stack, request, response);
    }

    private String[] categories;
    private String bean;

    @Override
    protected String getDefaultTemplate() {
        // 得到模板名,即 src/main/resources/template/simple/product-type-dropdown.ftl
        return "product-type-dropdown";
    }

    public String[] getCategories() {
        return categories;
    }

    public void setCategories(String[] categories) {
        this.categories = categories;
    }

    public void setBean(String bean) {
        this.bean = bean;

    }

    public String getBean() {
        return bean;
    }

}
